<template>
  <TableVue v-if="isFlage == 0" @getBlack="getShow"></TableVue>
  <EditFound v-else-if="isFlage == 1" @getBlack="getShow" :DataId="DataId"></EditFound>
  <DetailVue v-else-if="isFlage == 2" @getBlack="getShow" :DataId="DataId"></DetailVue>
  <AuditVue v-else-if="isFlage == 3" @getBlack="getShow" :status="status" :DataId="DataId"></AuditVue>
  <AddFundingVue v-else-if="isFlage == 4" @getBlack="getShow"></AddFundingVue>
  <DonationVue v-else-if="isFlage == 5" @getBlack="getShow" :DataId="DataId"></DonationVue>
</template>

<script setup>
  import TableVue from './model/table.vue';
  import EditFound from './model/editFund.vue';
  import DetailVue from './model/detail.vue';
  import AuditVue from './model/Audit.vue';
  import AddFundingVue from './model/addFunding.vue';
  import DonationVue from './model/donation.vue';
  import { ref } from 'vue';

  //0 表格初始化
  //1 编辑
  //2 详情
  //3 审核流
  //4 添加
  //5 捐赠人
  const DataId = ref();
  const isFlage = ref(0);
  const status = ref();
  function getShow(e) {
    console.log(e);
    isFlage.value = e.type;
    DataId.value = e.id;
    status.value = e.status;
  }
</script>

<style lang="scss" scoped></style>
